class Particle{
  pt a;
  float radius;
  vec velocity;
 Particle(pt a, vec velocity){
    this.a=a;
    this.velocity=velocity;
    this.radius=5;
 }
 void setVelocity(vec v){
  velocity=v; 
 }
 void setPt(pt P){
  a=P; 
 }
 pt getPt(){
  return a; 
 }
 void setRadius(float r){
  radius=r; 
 }
 void draw(){
      pushMatrix();
      noStroke();
      fill(green);
      translate(a.x,a.y,a.z); 
      sphereDetail(15,15);
      sphere(radius);
      popMatrix();
 }
 String toString(){
   return ("Location: "+a.x+","+a.y+"," +a.z+"Velocity: "+velocity.x+","+velocity.y); 
 }
 boolean intersects(Particle p){
    if(dist(p.a.x,p.a.y,p.a.z,this.a.x,this.a.y,this.a.z)<= (this.radius+p.radius)){
      return true;
    }
    return false;
      
 }
  
}
